<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId      : '#{Maybe(@current_community).facebook_connect_id.or_else(APP_CONFIG.fb_connect_id)}', // Community App ID if availble or else the one from the app dashboard
channelUrl : '//#{@current_community ? @current_community.full_domain : "www." + APP_CONFIG.domain}/channel.html', // Channel file for x-domain comms
status     : false,                                 // Check Facebook Login status
xfbml      : true,                                  // Look for social plugins on the page
version    : '#{FacebookSdkVersion::CLIENT}'
});
// Additional initialization code such as adding Event Listeners goes here
};
// Load the SDK asynchronously
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/#{@facebook_locale_code}/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
